package com.ruoyi.business.common.enums.order;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author zhengyz
 * @date 2025/3/13
 */
@Getter
@AllArgsConstructor
public enum OrderTypeEnum {

    STORE("STORE", "门店订单"),
    CONSUMER("CONSUMER", "消费者订单"),
    RECYCLE("RECYCLE", "回收订单"),
    ;

    private String value;
    private String desc;

    // 根据value获取对应的枚举
    public static OrderTypeEnum getByValue(String value) {
        for (OrderTypeEnum orderTypeEnum : OrderTypeEnum.values()) {
            if (orderTypeEnum.getValue().equals(value)) {
                return orderTypeEnum;
            }
        }
        return null;
    }

}
